﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="column_detail.aspx.cs" Inherits="admin_column_column_details"
    ValidateRequest="false" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head runat="server">
    <title>栏目新增(修改)</title>
    <link href="../css/default.css" rel="stylesheet" type="text/css" />

    <script type="text/jscript" src="../js/jUtility.js"></script>

    <script type="text/javascript"> 
    function subfunc() {		
	var o = form1;
	if(!isFilled(o.classname)){
		return warning('classname','栏目名称不能为空!');
	}
	
	
	if(o.eclassname.value!=""&&!IsSafeString(o.eclassname.value)){
		return warning('eclassname','请输入合法的英文栏目名称!');
	}	
	if(o.eclassname.value!=""&&ChinaStr(o.eclassname.value)){
		return warning('eclassname','英文栏目名称不能为中文!');
	}		
	/*if(!isFilled(o.orderid)){
		return warning('orderid','排序不能为空!');
	}*/
	if(!isFilled(o.columntypeid)){
		return warning('columntypeid','栏目类型不能为空!');
	}
	
	if(strLen(o.detail.value)>500){
		return warning('detail','栏目简介不能超过500字符!');
	}	
	return true;	  
}
function warning(FieldName,WarningString){
		alert(WarningString);
		eval("form1." + FieldName + ".focus();");
		return(false);
}
function goBack(){//返回
    location.href = "column_list.aspx?columnid=<%=Request.Params["parentid"] %>&layerid=<%=Request.Params["layerid"] %>";
    return false;
}
    </script>

</head>
<body>
    <form id="form1" runat="server" method="post">
    <asp:HiddenField ID="classid" runat="server" />
    <table width="100%" height="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
            <td height="414" align="left" valign="top" class="rightbg">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td height="2" bgcolor="#A49B81">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="25" background="../images/position_bg.gif" bgcolor="#EEF6FE" class="subnav"
                                        style="background-repeat: repeat-y; background-position: left; padding-left: 6px;
                                        padding-top: 3px;">
                                        <asp:Label ID="cnavi" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="1" bgcolor="#B0C9E8">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="16">
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top" style="padding-left: 10px;">
                            <table width="98%" height="508" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#2583BC"
                                bordercolordark="#ffffff">
                                <tr>
                                    <td height="506" valign="top">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <th width="25%" align="left">
                                                    请填写栏目信息--><asp:Label ID="cname" runat="server" Text="新增"></asp:Label>栏目
                                                </th>
                                            </tr>
                                        </table>
                                        <br>
                                        <br>
                                        <table width="100%" border="0">
                                            <tr>
                                                <td width="20%" align="right">
                                                    <font color="#FF0000">*</font> 栏目名称：
                                                </td>
                                                <td width="3%">
                                                    &nbsp;
                                                </td>
                                                <td width="77%">
                                                    <asp:TextBox ID="classname" runat="server" MaxLength="25" />
                                                    &nbsp;<label id="error1"></label>
                                                    <asp:HiddenField ID="parentid" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <font color="#FF0000"></font>目录名称(英文)：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="eclassname" runat="server" MaxLength="20" />
                                                    &nbsp;<label id="error2"></label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    排序：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:DropDownList runat="server" ID="orderid">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    类型：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:DropDownList runat="server" ID="columntypeid">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    导航是否显示：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList ID="isshow" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                        <asp:ListItem Text="是" Value="1" />
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    内容是否导航显示：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList ID="iscontentnavi" runat="server" RepeatDirection="Horizontal"
                                                        RepeatLayout="Flow">
                                                        <asp:ListItem Text="是" Value="1" />
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    是否需要审批：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList ID="isauditing" runat="server" RepeatDirection="Horizontal"
                                                        RepeatLayout="Flow">
                                                        <asp:ListItem Text="是" Value="1" />
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    首页模版：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:DropDownList runat="server" ID="templateindexid">
                                                        <asp:ListItem Text="请选择" Value="0" />
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    详细页模版：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:DropDownList runat="server" ID="templatedetailid">
                                                        <asp:ListItem Text="请选择" Value="0" />
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr runat="server"  id="productlinks" visible="false">
                                                <td align="right">
                                                    <font color="#FF0000"></font>相关产业链：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:DropDownList runat="server" ID="buslist">
                                                        <asp:ListItem Text="--请选择--" Value="0" />
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    Banner width: 976px; height: 284px
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    栏目Banner图片：
                                                    <asp:HiddenField ID="classpic" runat="server" />
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <img src="" runat="server" id="classpicimg" width="200" alt="" />
                                                    <input type="button" value="删除" id="classpicimg_del" onclick="delimg('classpic','classpicimg');"
                                                        style="display: none" />
                                                    <iframe name="ad" frameborder="0" width="100%" height="25" scrolling="no" src="../common/upload.aspx?fildname=classpic">
                                                    </iframe>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    国家粮食安全：380*88；食品安全：264*88
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    栏目首页题头图：
                                                    <asp:HiddenField ID="titleImg" runat="server" />
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <img src="" runat="server" id="titleImg_img" width="80" alt="" />
                                                    <input type="button" value="删除" id="titleImg_img_del" onclick="delimg('titleImg','titleImg_img');"
                                                        style="display: none" />
                                                    <iframe name="ad" frameborder="0" width="100%" height="25" scrolling="no" src="../common/upload.aspx?fildname=titleImg">
                                                    </iframe>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    美味人生：heigth:36
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    栏目标题图：
                                                    <asp:HiddenField ID="nameimg" runat="server" />
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <img src="" runat="server" id="nameimg_img" width="80" alt="" />
                                                    <input type="button" value="删除" id="nameimg_img_del" onclick="delimg('nameimg','nameimg_img');"
                                                        style="display: none" />
                                                    <iframe name="ad" frameborder="0" width="100%" height="25" scrolling="no" src="../common/upload.aspx?fildname=nameimg">
                                                    </iframe>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" valign="top">
                                                    栏目META(CODE)：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:TextBox TextMode="MultiLine" runat="server" ID="codeMeta" Columns="50" Rows="4" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" valign="top">
                                                    栏目介绍：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:TextBox TextMode="MultiLine" runat="server" ID="detail" Columns="50" Rows="7" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    内容是否静态发布：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList ID="isstaticpub" runat="server" RepeatDirection="Horizontal"
                                                        RepeatLayout="Flow">
                                                        <asp:ListItem Text="是" Value="1" />
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    静态发布首页生成：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:CheckBox ID="is_class_index" Text="栏目首页" runat="server" />
                                                    <asp:CheckBox ID="is_index" Text="网站首页" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    静态发布标签生成：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:CheckBoxList ID="htmlTags" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                    </asp:CheckBoxList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    栏目首页是否静态发布：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList ID="class_is_static" runat="server" RepeatDirection="Horizontal"
                                                        RepeatLayout="Flow">
                                                        <asp:ListItem Text="是" Value="1" />
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0" id="static1">
                                            <tr>
                                                <td align="right" width="20%">
                                                    文件名称(默认栏目ID)：
                                                </td>
                                                <td width="3%">
                                                    &nbsp;
                                                </td>
                                                <td width="77%">
                                                    <asp:TextBox ID="columnfilename" size="50" MaxLength="200" runat="server" />
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0" id="edit1">
                                            <tr>
                                                <td align="right" width="20%">
                                                    SEO优化：
                                                </td>
                                                <td width="3%">
                                                    &nbsp;
                                                </td>
                                                <td width="77%">
                                                    <input type="checkbox" name="pos" id="pos" onclick="javascript:showmore();">
                                                    &nbsp;&nbsp;
                                                    <label id="curpage">
                                                    </label>
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0" id="com1" style="display: none">
                                            <tr>
                                                <td align="right" width="20%">
                                                    HTML Title：
                                                </td>
                                                <td width="3%">
                                                    &nbsp;
                                                </td>
                                                <td width="77%">
                                                    <asp:TextBox ID="columntitle" size="50" MaxLength="200" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td height="50" align="right" valign="top">
                                                    Meta Keywords Tag：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:TextBox Rows="3" Columns="50" runat="server" ID="columnkeyword" TextMode="MultiLine" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td height="50" align="right" valign="top">
                                                    Meta Description Tag：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:TextBox Rows="3" Columns="50" runat="server" ID="columndesc" TextMode="MultiLine" />
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0">
                                            <tr>
                                                <td align="right">
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td align="left">
                                                    <asp:Button runat="server" ID="submit" Text="提交" OnClick="subBut_click" OnClientClick="return subfunc();" />
                                                    <input type="reset" name="Submit2" value="重填" />
                                                    <input type="button" name="backbut" value="返回" onclick="goBack();" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
    <asp:Label ID="message" runat="server" />

    <script type="text/javascript">
        function delimg(id, sid) {
            document.getElementById(id).value = "";
            document.getElementById(sid).style.display = "none";
            alert("点击提交后删除");

        }
        if (document.getElementById("classpicimg")) document.getElementById("classpicimg_del").style.display = "";
        if (document.getElementById("titleImg_img")) document.getElementById("titleImg_img_del").style.display = "";
        if (document.getElementById("nameimg_img")) document.getElementById("nameimg_img_del").style.display = "";
    </script>

</body>
</html>
